import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Layout/components/LayoutHome.vue';
import Login from '../views/Login/UserLogin.vue';
import UserCenter from '../views/Layout/UserPages/UserCenter.vue';
//订单来源
import OnlineOrder from '../views/OrderSource/OnlineOrder.vue';
import OfflineOrder from '../views/OrderSource/OfflineOrder.vue';
import PhoneOrder from '../views/OrderSource/PhoneOrder.vue';
import EmailOrder from '../views/OrderSource/EmailOrder.vue';

//工单管理
import AllTickets from '../views/TicketManagement/AllTickets.vue';
import PendingTickets from '../views/TicketManagement/PendingTickets.vue';
import ProcessingTickets from '../views/TicketManagement/ProcessingTickets.vue';
import ResolvedTickets from '../views/TicketManagement/ResolvedTickets.vue';
import ClosedTickets from '../views/TicketManagement/ClosedTickets.vue';

// 部门员工管理
import DepartmentManage from '../views/DepartmentStaff/DepartmentManage.vue';
import StaffManage from '../views/DepartmentStaff/StaffManage.vue';
import RolePermission from '../views/DepartmentStaff/RolePermission.vue';
import PositionSetting from '../views/DepartmentStaff/PositionSetting.vue';

// 客户管理
import CustomerInfoManage from '../views/CustomerManagement/CustomerInfoManage.vue';
import MerchantCustomer from '../views/CustomerManagement/MerchantCustomer.vue';
import EnterpriseCustomer from '../views/CustomerManagement/EnterpriseCustomer.vue';
import VIPCustomer from '../views/CustomerManagement/VIPCustomer.vue';

// 公司团队配置
import TeamManage from '../views/TeamConfiguration/TeamManage.vue';
import WorkGroup from '../views/TeamConfiguration/WorkGroup.vue';
import SkillConfig from '../views/TeamConfiguration/SkillConfig.vue';
import DutySchedule from '../views/TeamConfiguration/DutySchedule.vue';

//设备管理
import DeviceInventory from '../views/DeviceManagement/DeviceInventory.vue';
import DeviceMaintenance from '../views/DeviceManagement/DeviceMaintenance.vue';
import DeviceAssignment from '../views/DeviceManagement/DeviceAssignment.vue';
import DeviceScrap from '../views/DeviceManagement/DeviceScrap.vue';

//备件耗材管理
import ConsumableList from '../views/MaterialManagement/ConsumableList.vue';
import InboundManage from '../views/MaterialManagement/InboundManage.vue';
import OutboundManage from '../views/MaterialManagement/OutboundManage.vue';
import InventoryCheck from '../views/MaterialManagement/InventoryCheck.vue';

//运营配置
import AnnouncementManage from '../views/OperationConfig/AnnouncementManage.vue';
import MessageTemplate from '../views/OperationConfig/MessageTemplate.vue';
import WorkflowSetting from '../views/OperationConfig/WorkflowSetting.vue';
import SLAConfig from '../views/OperationConfig/SLAConfig.vue';

//高级设置
import SystemSettings from '../views/AdvancedSettings/SystemSettings.vue';
import PermissionSettings from '../views/AdvancedSettings/PermissionSettings.vue';
import LogManagement from '../views/AdvancedSettings/LogManagement.vue';
import DataBackup from '../views/AdvancedSettings/DataBackup.vue';

///统计报表
import TicketStatistics from '../views/Reports/TicketStatistics.vue';
import CustomerSatisfaction from '../views/Reports/CustomerSatisfaction.vue';
import EmployeePerformance from '../views/Reports/EmployeePerformance.vue';
import ServiceMetrics from '../views/Reports/ServiceMetrics.vue';
import CustomReports from '../views/Reports/CustomReports.vue';

//排期
import RosterManage from '../views/ScheduleManagement/RosterManage.vue';
import VacationArrange from '../views/ScheduleManagement/VacationArrange.vue';
import TaskAssign from '../views/ScheduleManagement/TaskAssign.vue';
import ResourceSchedule from '../views/ScheduleManagement/ResourceSchedule.vue';

//调度
import TaskDispatch from '../views/DispatchManagement/TaskDispatch.vue';
import StaffDispatch from '../views/DispatchManagement/StaffDispatch.vue';
import ResourceDispatch from '../views/DispatchManagement/ResourceDispatch.vue';
import EmergencyDispatch from '../views/DispatchManagement/EmergencyDispatch.vue';
import SupplierList from '@/views/SupplierManagement/SupplierList.vue';
const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/user',
    name: 'UserCenter',
    component: UserCenter
  },
  {
    path: '/supplier',
    component:SupplierList
  },
  {
    path: '/login',
    component: Login,
  },
  {
    path: '/home',
    name: 'LayoutHome',
    component: Home
  },
  {
    path: '/order/online',
    name: 'OnlineOrder',
    component: OnlineOrder
  },
  {
    path: '/order/offline',
    name: 'OfflineOrder',
    component: OfflineOrder
  },
  {
    path: '/order/phone',
    name: 'PhoneOrder',
    component: PhoneOrder
  },
  {
    path: '/order/email',
    name: 'EmailOrder',
    component: EmailOrder
  },
  {
    path: '/tickets/all',
    name: 'AllTickets',
    component: AllTickets
  },
  {
    path: '/tickets/pending',
    name: 'PendingTickets',
    component: PendingTickets
  },
  {
    path: '/tickets/processing',
    name: 'ProcessingTickets',
    component: ProcessingTickets
  },
  {
    path: '/tickets/resolved',
    name: 'ResolvedTickets',
    component: ResolvedTickets
  },
  {
    path: '/tickets/closed',
    name: 'ClosedTickets',
    component: ClosedTickets
  },
  // 在routes数组中添加以下路由
{
  path: '/department/staff',
  name: 'DepartmentStaff',
  component: DepartmentManage
},
{
  path: '/department/employee',
  name: 'StaffManage',
  component: StaffManage
},
{
  path: '/department/role',
  name: 'RolePermission',
  component: RolePermission
},
{
  path: '/department/position',
  name: 'PositionSetting',
  component: PositionSetting
},
{
  path: '/customer/info',
  name: 'CustomerInfoManage',
  component: CustomerInfoManage
},
{
  path: '/customer/merchant',
  name: 'MerchantCustomer',
  component: MerchantCustomer
},
{
  path: '/customer/enterprise',
  name: 'EnterpriseCustomer',
  component: EnterpriseCustomer
},
{
  path: '/customer/vip',
  name: 'VIPCustomer',
  component: VIPCustomer
},
// 在routes数组中添加以下路由
{
  path: '/team/manage',
  name: 'TeamManage',
  component: TeamManage
},
{
  path: '/team/workgroup',
  name: 'WorkGroup',
  component: WorkGroup
},
{
  path: '/team/skill',
  name: 'SkillConfig',
  component: SkillConfig
},
{
  path: '/team/schedule',
  name: 'DutySchedule',
  component: DutySchedule
},
{
  path: '/device/inventory',
  name: 'DeviceInventory',
  component: DeviceInventory
},
{
  path: '/device/maintenance',
  name: 'DeviceMaintenance',
  component: DeviceMaintenance
},
{
  path: '/device/assignment',
  name: 'DeviceAssignment',
  component: DeviceAssignment
},
{
  path: '/device/scrap',
  name: 'DeviceScrap',
  component: DeviceScrap
},
// 在routes数组中添加以下路由
{
  path: '/material/consumable',
  name: 'ConsumableList',
  component: ConsumableList
},
{
  path: '/material/inbound',
  name: 'InboundManage',
  component: InboundManage
},
{
  path: '/material/outbound',
  name: 'OutboundManage',
  component: OutboundManage
},
{
  path: '/material/inventory',
  name: 'InventoryCheck',
  component: InventoryCheck
},
{
  path: '/operation/announcement',
  name: 'AnnouncementManage',
  component: AnnouncementManage
},
{
  path: '/operation/message',
  name: 'MessageTemplate',
  component: MessageTemplate
},
{
  path: '/operation/workflow',
  name: 'WorkflowSetting',
  component: WorkflowSetting
},
{
  path: '/operation/sla',
  name: 'SLAConfig',
  component: SLAConfig
},
// 在routes数组中添加以下路由
{
  path: '/advanced/system',
  name: 'SystemSettings',
  component: SystemSettings
},
{
  path: '/advanced/permission',
  name: 'PermissionSettings',
  component: PermissionSettings
},
{
  path: '/advanced/log',
  name: 'LogManagement',
  component: LogManagement
},
{
  path: '/advanced/backup',
  name: 'DataBackup',
  component: DataBackup
},
{
  path: '/report/ticket',
  name: 'TicketStatistics',
  component: TicketStatistics
},
{
  path: '/report/satisfaction',
  name: 'CustomerSatisfaction',
  component: CustomerSatisfaction
},
{
  path: '/report/performance',
  name: 'EmployeePerformance',
  component: EmployeePerformance
},
{
  path: '/report/metrics',
  name: 'ServiceMetrics',
  component: ServiceMetrics
},
{
  path: '/report/custom',
  name: 'CustomReports',
  component: CustomReports
},
// 在routes数组中添加以下路由
{
  path: '/schedule/roster',
  name: 'RosterManage',
  component: RosterManage
},
{
  path: '/schedule/vacation',
  name: 'VacationArrange',
  component: VacationArrange
},
{
  path: '/schedule/task',
  name: 'TaskAssign',
  component: TaskAssign
},
{
  path: '/schedule/resource',
  name: 'ResourceSchedule',
  component: ResourceSchedule
},
{
  path: '/dispatch/task',
  name: 'TaskDispatch',
  component: TaskDispatch
},
{
  path: '/dispatch/staff',
  name: 'StaffDispatch',
  component: StaffDispatch
},
{
  path: '/dispatch/resource',
  name: 'ResourceDispatch',
  component: ResourceDispatch
},
{
  path: '/dispatch/emergency',
  name: 'EmergencyDispatch',
  component: EmergencyDispatch
}
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;